package model

import (
	"gorm.io/gorm"
	"time"
)

type Exam struct {
	Id               uint           `gorm:"column:id;type:bigint(20) UNSIGNED;primaryKey;not null;" json:"id"`
	CreatedAt        time.Time      `gorm:"column:created_at;type:datetime(3);not null;" json:"created_at"`
	UpdateAt         time.Time      `gorm:"column:update_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"update_at"`
	DeleteAt         gorm.DeletedAt `gorm:"column:delete_at;type:datetime(3);default:NULL;" json:"delete_at"`
	UserId           uint           `gorm:"column:user_id;type:bigint(20) UNSIGNED;not null;default:0;" json:"user_id"`
	ExamName         string         `gorm:"column:exam_name;type:varchar(255);not null;" json:"exam_name"`
	ExamTime         time.Time      `gorm:"column:exam_time;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"exam_time"`
	ExamIntroduction string         `gorm:"column:exam_introduction;type:varchar(255);not null;" json:"exam_introduction"`
}

func (e *Exam) TableName() string {
	return "exam"
}
